int removeElement(int* nums, int numsSize, int val)
{
    int ret = 0;
    int j = 0;
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] != val)
        {
            ret++;
            nums[j++] = nums[i];
        }
    }
    return ret;
}